﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/admin/AdminMaster.master" ValidateRequest="false" CodeFile="addJobSeekerAdminer.aspx.cs" Inherits="admin_addJobSeekerAdminer" %>

<%@ Register Assembly="DotNetTextBox" Namespace="DotNetTextBox" TagPrefix="DNTB" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="AdminRight">
    <div class="rightHeader1">
        <div class="rightHLeft"><span class="rightHeaderTitle">当前位置</span></div>
        <div class="rightHMiddle2">
            <span>
                <a href="Default.aspx" class="moreRight" style="float: left;">首页</a> <span class="jian">></span>
                <a href="JobSeekerAdminer.aspx" class="moreRight" style="float: left;">求职指导</a><span class="jian">></span>
                <a href="addJobSeekerAdminer.aspx" class="moreRight" style="float: left;">添加求职指导</a>
            </span>
        </div>
        <div class="rightHRight"></div>
    </div>
    <div style="margin-top: 10px; width: 760px;">
        <asp:FormView ID="FormView2" runat="server" DataKeyNames="jsid"
            DataSourceID="SqlDataSource2" AllowPaging="True" Width="760px"
            BackColor="LightGoldenrodYellow" BorderColor="#dddddd" BorderWidth="1px"
            CellPadding="2" ForeColor="Black" OnDataBound="FormView2_DataBound" DefaultMode="Insert">
            <FooterStyle BackColor="#1f93e0" ForeColor="#333333" />
            <RowStyle BackColor="White" ForeColor="#333333" />
            <PagerStyle BackColor="#1f93e0" ForeColor="#FFFFFF" HorizontalAlign="Center" />
            <EditItemTemplate>
                标题:
                <asp:TextBox ID="jsnameTextBox" runat="server" Text='<%# Bind("jsname") %>' />
                <br />
                <DNTB:WebEditor ID="WebEditor1" runat="server" AdjustSize="50"
                    BackColor="White" BorderColor="#DDDDDD" BorderWidth="0px"
                    CodeBackColor="#E8F4FF" CodeBorder="1px" CodeBorderColor="#6595D6"
                    CodeBorderStyle="Dotted" CodeTitle="以下是代码片段：" EditBorderColor="#CDCDD3"
                    EditHeight="210px" Height="280px" LeftAreaAlign="center" LeftAreaWidth="36%"
                    QuoteBackColor="#E8F4FF" QuoteBorder="1px" QuoteBorderColor="#6595D6"
                    QuoteBorderStyle="Dotted" QuoteTitle="以下是引用片段：" RightAreaAlign="center"
                    RightAreaWidth="64%" Shadow="False" StatusHeight="20px"
                    systemFolder="system_dntb/" Text='<%# Bind("jsinfo") %>' ToolBarColor="#EFEFEF"
                    ToolBarHeight="50px" Width="555px" />
                分类：<asp:DropDownList ID="DropDownList2" runat="server"
                    DataSourceID="SqlDataSource1" DataTextField="jscname" DataValueField="jscid"
                    SelectedValue='<%# Bind("jscid") %>'>
                </asp:DropDownList>
                <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
                    CommandName="Update" Text="更新" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"
                    CausesValidation="False" CommandName="Cancel" Text="取消" />
            </EditItemTemplate>
            <InsertItemTemplate>
                标题:
                <asp:TextBox ID="jsnameTextBox" runat="server" Text='<%# Bind("jsname") %>' />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                    ControlToValidate="jsnameTextBox" ErrorMessage="*" ValidationGroup="1"></asp:RequiredFieldValidator>
                <br />
                <DNTB:WebEditor ID="WebEditor2" runat="server" AdjustSize="50"
                    BackColor="White" BorderColor="#DDDDDD" BorderWidth="0px"
                    CodeBackColor="#E8F4FF" CodeBorder="1px" CodeBorderColor="#6595D6"
                    CodeBorderStyle="Dotted" CodeTitle="以下是代码片段：" EditBorderColor="#CDCDD3"
                    EditHeight="210px" Height="280px" LeftAreaAlign="center" LeftAreaWidth="36%"
                    QuoteBackColor="#E8F4FF" QuoteBorder="1px" QuoteBorderColor="#6595D6"
                    QuoteBorderStyle="Dotted" QuoteTitle="以下是引用片段：" RightAreaAlign="center"
                    RightAreaWidth="64%" Shadow="False" StatusHeight="20px"
                    systemFolder="system_dntb/" Text='<%# Bind("jsinfo") %>' ToolBarColor="#EFEFEF"
                    ToolBarHeight="50px" Width="555px" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                    ControlToValidate="WebEditor2" ErrorMessage="文章内容不能为空!" ValidationGroup="1"></asp:RequiredFieldValidator>
                <br />
                类别：<asp:DropDownList ID="DropDownList1" runat="server"
                    DataSourceID="SqlDataSource1" DataTextField="jscname" DataValueField="jscid"
                    SelectedValue='<%# Bind("jscid") %>'>
                </asp:DropDownList>
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
                    CommandName="Insert" Text="插入" ValidationGroup="1" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server"
                    CausesValidation="False" Text="取消"
                    PostBackUrl="~/admin/JobSeekerAdminer.aspx" />
            </InsertItemTemplate>
            <ItemTemplate>
                标题:
                <asp:Label ID="jsnameLabel" runat="server" Text='<%# Bind("jsname") %>' />
                <br />
                <asp:Label ID="jsinfoLabel" runat="server" Text='<%# Bind("jsinfo") %>' />
                <br />
                发布时间:
                <asp:Label ID="jstimeLabel" runat="server"
                    Text='<%# Bind("jstime", "{0:d}") %>' />
                <br />
                <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
                    CommandName="Edit" Text="编辑" />
                &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
                    CommandName="Delete" Text="删除" />
                &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
                    CommandName="New" Text="新建" />
            </ItemTemplate>
            <HeaderStyle BackColor="#1f93e0" Font-Bold="True" ForeColor="#FFFFFF" />
            <EditRowStyle BackColor="#FFFFFF" Font-Bold="True" ForeColor="#333333" />
        </asp:FormView>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [jobseekerclass] WHERE [jscid] = @original_jscid AND [jscname] = @original_jscname"
        InsertCommand="INSERT INTO [jobseekerclass] ([jscname]) VALUES (@jscname)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT * FROM [jobseekerclass]"
        UpdateCommand="UPDATE [jobseekerclass] SET [jscname] = @jscname WHERE [jscid] = @original_jscid AND [jscname] = @original_jscname">
        <DeleteParameters>
            <asp:Parameter Name="original_jscid" Type="Int32" />
            <asp:Parameter Name="original_jscname" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="jscname" Type="String" />
            <asp:Parameter Name="original_jscid" Type="Int32" />
            <asp:Parameter Name="original_jscname" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="jscname" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [jobseeker] WHERE [jsid] = @original_jsid"
        InsertCommand="INSERT INTO [jobseeker] ([jsname], [jsinfo], [jstime], [jscid]) VALUES (@jsname, @jsinfo, getdate(), @jscid)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT jobseeker.jsid AS Expr1, jobseeker.jsname AS Expr2, jobseeker.jsinfo AS Expr3, jobseeker.jstime AS Expr4, jobseeker.jscid AS Expr5, jobseekerclass.jscname, jobseeker.* FROM jobseeker INNER JOIN jobseekerclass ON jobseeker.jscid = jobseekerclass.jscid"
        UpdateCommand="UPDATE [jobseeker] SET [jsname] = @jsname, [jsinfo] = @jsinfo, [jscid] = @jscid WHERE [jsid] = @original_jsid">
        <DeleteParameters>
            <asp:Parameter Name="original_jsid" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="jsname" Type="String" />
            <asp:Parameter Name="jsinfo" Type="String" />
            <asp:Parameter Name="jscid" Type="Int32" />
            <asp:Parameter Name="original_jsid" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="jsname" Type="String" />
            <asp:Parameter Name="jsinfo" Type="String" />
            <asp:Parameter Name="jscid" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
</asp:Content>
